<?php

class ProgramasController extends AppController {

    public $sl_programas = array(
        'actions' => array('V' => 'view', 'E' => 'edit', 'D' => 'delete'),
        'filters' => array(
            array('name' => 'Programa.nombre', 'label' => 'Nombre')
        ),
        'columns' => array(
            array('name' => 'Programa.nombre', 'label' => 'Nombre')
        )
    );
    public $maint_programas = array(
        'fields' => array(
            'Descripción del Programa' =>
            array(
                array('name' => 'fecha_carga', 'label' => 'Fecha Carga', 'presentation' => 'DATETIME', 'classparams' => '{"force":true}', 'isvisible' => false, 'actions' => 'A'),
                array("name" => "user_id", "label" => "Usuario Carga", "presentation" => "USER", 'classparams' => '{"force":true}', 'isvisible' => false, "actions" => "A"),
                array('name' => 'nombre', 'label' => 'Nombre')
            )
        )
    );

    public function add() {
        $this->maint = $this->maint_programas;
        parent::add();
    }

    public function edit($id = null) {
        $this->maint = $this->maint_programas;
        parent::edit($id);
    }

    public function index() {
        $this->search_list = $this->sl_programas;
        parent::index();
    }

    public function view($id = null) {
        $this->maint = $this->maint_programas;
        parent::view($id);
    }

}